<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:dxl="http://www.lotus.com/dxl"
    xmlns:session="java:ro.egmar.dojocache.extensions.SessionExtension"
    exclude-result-prefixes="session xs dxl">
    
    <!-- Output options -->
    <xsl:output
        method="xml"
        omit-xml-declaration="yes"
        indent="yes"
    />
    
    <!-- Global parameters -->
    <xsl:param name="webDbPath"/>
    <xsl:param name="notesDbPath"/>
    
    <!-- Strip whitespace -->
    <xsl:strip-space elements="*"></xsl:strip-space>
    
    <!-- Overriding default templates -->
    <xsl:template match="text()|@*" />
    
    <!-- Template for simple text item -->
    <xsl:template match="dxl:item/dxl:text">
        <item name="{../@name}">
            <xsl:value-of select="text()"></xsl:value-of>
        </item>
    </xsl:template>

    <!-- Root template, main entry point -->
    <xsl:template match="/">
        <document unid="{dxl:noteinfo/@unid}">
            <xsl:apply-templates/>
        </document>
    </xsl:template>
    
</xsl:stylesheet>